package by.semerikov.converter.tostring;

import java.util.Map;

import by.semerikov.parts.Code;

public class StatisticByCodePersentToStringFormater {
	
	public String convert(Map<Integer,Double> map)
	{
		StringBuilder result = new StringBuilder();
		for (int i = 0; i < Code.codes.length; i++) {
			Double temp = map.get(Code.codes[i]);
			if(temp > 0)
			{
				result.append(Code.codes[i].toString());
				result.append(" - ");
				result.append(temp.toString());
				result.append("\n\r");
			}
		}
		return result.toString();
	}
}
